//
//  student.swift
//  sorting
//
//  Created by lhc on 2023/8/17.
//

import Foundation

class Student {
    private let score: Int
    init(score: Int) {
        self.score = score
    }
}

extension Student: Comparable {
    static func < (lhs: Student, rhs: Student) -> Bool {
        return lhs.score < rhs.score
    }
    
    static func == (lhs: Student, rhs: Student) -> Bool {
        return lhs.score == rhs.score
    }
}

extension Student: CustomStringConvertible {
    var description: String {
        return "score: \(score)"
    }
}
